<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .one{
            width:300px;
            height:200px;
            border:1px solid red;
            /* overflow:hidden;*/    /*将超出的文字内容部分进行隐藏*/
            /*overflow:scroll;*/      /*添加滚动条*/
            overflow:auto;          /*文字内容没有超出则不添加滚动条，超出则添加滚动条*/
        }
    </style>
</head>
<body>
   <div class="one">
        <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
       <p>jflksdjflkjdsklfjkdjfldskfjlk</p>
   </div>
</body>
</html>